package com.example.netty;

import java.util.HashMap;
import java.util.Map;

public class TestThreadLocal {
    public static final ThreadLocal<String> tl1 = new ThreadLocal<>();
    public static final ThreadLocal<String> tl2 = new ThreadLocal<>();
    public static final ThreadLocal<String> tl3 = new ThreadLocal<>();
    // public static final Map<Object, String> map = new HashMap<>();

    public static void main(String[] args) {
        // ThreadLocalMap
        Thread t1 = new Thread(() -> {
            tl1.set("hello");
            tl2.set("world");
            tl3.set("nihao");
            Thread currentThread = Thread.currentThread();
            System.out.println("hello world");
        }, "t1");


        t1.start();
    }
}
